﻿@using EC.Entity.Response.FrozenBalanceLog
@using EC.Entity.Enum

@model EC.Entity.PagedList<FrozenBalanceLogQueryResponse>
<div class="data-body data-scroll">
    <div class="data-view">
        <div class="data-div-view table-responsive">
            <table class="table table-hover table-striped table-bordered">
                <thead>
                    <tr>
                        <th class="t_l">商户名称</th>
                        <th class="t_l wd100">来源</th>
                        <th class="t_l wd75">冻结金额</th>
                        <th class="t_c wd75">状态</th>
                        <th class="t_l wd100">备注</th>
                        <th class="t_c wd75">操作</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model != null && Model.TData != null && Model.TData.Any())
                    {
                        foreach (var item in (IEnumerable<FrozenBalanceLogQueryResponse>)Model.TData)
                        {
                    <tr>
                        <td class="t_l">@(item.MerchantName)</td>
                        <td class="t_l wd100">
                            @switch (item.Source)
                            {
                                case (sbyte)FrozenBalanceLogSource.付款余额:
                                    <span class="">付款余额</span>
                                    break;
                                case (sbyte)FrozenBalanceLogSource.存款余额:
                                    <span class="">存款余额</span>
                                    break;
                                default:
                                    <span></span>
                                    break;
                            }
                        </td>
                        <td class="t_l wd75">@(item.Amount)</td>
                        <td class="t_c wd75">
                            @(item.Status == (sbyte)FrozenBalanceLogStatus.冻结 ? Html.Raw("<span class='green bold'>冻结</span>") : Html.Raw("<span class='red bold'>解冻</span>"))
                        </td>
                        <td class="t_l wd100">@(item.Remark)</td>
                        <td class="t_c wd75">
                            @if (item.Status == (sbyte)FrozenBalanceLogStatus.冻结)
                            {
                                <a class="btn btn-danger btn-xs" data-confirm="确定要解冻该余额？" data-succesFun="doSearch()" data-href="/Merchant/Thaw?id=@(item.Id)&status=@((sbyte)FrozenBalanceLogStatus.解冻)">解冻</a>
                            }
                        </td>
                    </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="6" class="t_c">暂无记录</td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>
<!-- 必要的分页参数设置 -->
<input type="hidden" id="TotalCount" value="@(Model != null ? Model.TotalCount : 0)" />